package com.cy.demo523.untitled2.src.com.cy.lmpl;

import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;

public class SqlCannection {
    private  static  final String URL = "jdbc:mysql://localost:3306/usersDb";
    private  static  final String USERNAME  ="root";
    private  static  final String PASSWORD = "123456";

    public static Connection getCon()throws  ClassNotFoundException , SQLException {
        Class.forName("com.mysql.cj.jdbc.Driver") ;
        return DriverManager .getConnection(URL,USERNAME ,PASSWORD) ;
    }
}
